package test;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author
 * @date 2021年11月02日 22:00
 * @description
 */
public class MaxThreadDemo extends Thread{
    private static final AtomicInteger count = new AtomicInteger();

    @Override
    public void run() {
        System.out.println(count.incrementAndGet());
        for (; ; ) {
            try {
                TimeUnit.SECONDS.sleep(Integer.MAX_VALUE);
            } catch (InterruptedException e) {
                break;
            }

        }
    }

    public static void main(String[] args) {

        System.out.println(1);
//        while (true){
//            (new MaxThreadDemo()).start();
//        }

    }
}
